
import {  RouteRecordRaw } from 'vue-router';

let modules:any =import.meta.glob("./modules/*.ts",{ eager: true,import:'default' });
// * 导入所有静态router 
const routerArray:Array<RouteRecordRaw> = [] ;


Object.keys(modules).forEach((key:string)   => {
    let arr = modules[key] as Array<RouteRecordRaw>;
    for(let i=0;i<arr.length;i++) routerArray.push(arr[i]);
});



export default {
    routes: (_routes: any) => {
        return [
        ..._routes,
        ...routerArray
     ]
   }
}